package com.JL.engine.components;

import com.JL.engine.model.Component;

import java.awt.*;

public class DimensionComponent extends Component {

    private final Dimension dimension = new Dimension();

    public int getWidth(){
        return dimension.width;
    }

    public int getHeight(){
        return dimension.height;
    }

    public void setWidth(int width){
        dimension.width = width;
    }

    public void setHeight(int height){
        dimension.height = height;
    }

    public void setSize(int width, int height){
        dimension.width = width;
        dimension.height = height;
    }

    public void setSize(Dimension dimension){
        this.setSize(dimension.width, dimension.height);
    }
}
